FSO components of the CreateTextFile method introduced, interested in small partners can learn
Object. CreateTextFile (filename[, overwrite[, Unicode])
Parameter: Object
Required option. Should be the name of the FileSystemObject or Folder object.
FileName
Required option. A string expression that indicates the file to be created.
Overwrite
Options are available. A Boolean value that indicates whe
Definition and usage
The CreateTextFile method creates a new text file in the current folder and returns a TextStream object for reading and writing to this file.
Grammar:
Filesystemobject.createtextfile (Filename[,overwrite[,unicode]]) folderobject.createtextfile (filename[,overwrite [, Unicode]])
filename is required. The name of the file that needs to be created.
overwrite is optional. A Boolean value that indicates whether the existing file can be
Object. CreateTextFile (filename[, overwrite[, Unicode])
Parameters: Object
Required option. Should be the name of the FileSystemObject or Folder object.
FileName
Required option. A string expression that indicates the file you want to create.
Overwrite
Options available. A Boolean value that indicates whether an existing file can be overwritten. True if the file can be overwritten, otherwise false. If omitted, the existing file cannot be overwr
ASP FSO: Create a file CreateTextFile instance tutorial
The CreateTextFile method creates a new text file in the current folder and returns the TextStream object, which can be used to read or write to the file.
Grammar
Filesystemobject.createtextfile (Filename[,overwrite[,unicode]])
Folderobject.createtextfile (Filename[,overwrite[,unicode]])
Parameter
Descri
Createtextfile Method
Create a specified file and returnTextstreamObject, which can be used to read or write files created.
Object.Createtextfile(Filename [, overwrite [, Unicode]) Parameters
Object
Required. The name of the FileSystemObject or folder object.
Filename
Required. String expression, indicating the file to be created.
Overwrite
Optional. Boolean indicates whether existing files can be overwritten. If the file can be overwrit
CreateTextFile method
Creates a specified file and returns a TextStream object that can be used to read or write the created file.
object.CreateTextFile(filename[, overwrite[, unicode]])
Parameters
Object
Required option. Should be the name of the FileSystemObject or Folder object.
FileName
Required option. A string expression that indicates the file to create.
Overwrite
Options available. A Boolean value that indicates whether an existing file can be
. CreateFolder (temp)End IfIf you do not fully understand the above procedure, please listen to the author slowly. The file access component provides methods and properties that you can use to access the computer's file system. We can use the file access component to create a FileSystemObject object, and the first sentence of the above program is to create an object instance named FS with the file access component. After the object is created, you can access the file through it, which has no att
There are two main types of file processing:
Create, add, or delete data, and read files
Moving, copying, and deleting files
Create a file
There are three ways to create an empty text file (sometimes called a "text stream").
The first method is to use the CreateTextFile method. The following example demonstrates how to create a text file in VBScript in this way:
Dim FSO, F1
Set fso = CreateObject ("Scripting.FileSystemObject")
Set f1 = fso.
I. function implementation core: FileSystemObject object
To implement file operations in Javascript, FileSystemObject objects are primarily used.
Ii. FileSystemObject Programming
It is very easy to program with FileSystemObject object. Generally, the following steps are required: Create a FileSystemObject object, apply related methods, and access object attributes.
(1) create a FileSystemObject object
Only one line of code is required to create a FileSystemObject object:
VaR FSO = new activexobj
FileSystemObject has two main types of file processing:
Create, add, or delete data, and read files
Moving, copying, and deleting files
Create a file
There are three ways to create an empty text file (sometimes called a "text stream").
The first method is to use the CreateTextFile method. The following example demonstrates how to create a text file in VBScript in this way:
Dim FSO, F1
Set fso = CreateObject ("Scripting.FileSystemObject")
Set f1 = f
This article is reprinted fromHttp://www.late-fall.com/forum/archiver? Tid-613.htmlThank you very much for the original author.
I. function implementation core: FileSystemObject objectTo implement file operations in Javascript, FileSystemObject objects are primarily used.Ii. FileSystemObject ProgrammingIt is easy to program with FileSystemObject object,Follow these steps:Create a FileSystemObject object, application-related methods, and access object attributes.(1) create a FileSystemObject obj
I. Core functions: FileSystemObject objects. To implement file operations in Javascript, FileSystemObject objects are primarily used.
Ii. FileSystemObject programming Trilogy
(1) create a FileSystemObject object, application-related methods, and Access Object-related attributes.VaR FSO = new activexobject ("scripting. FileSystemObject ");(2) Use the createtextfile method to create a text file:VaR F1 = FSO. create
Javascript-File Operations
I. function implementation core: FileSystemObject object
To implement file operations in javascript, FileSystemobject objects are primarily used.
Ii. FileSystemObject Programming
It is very easy to program with FileSystemObject object. Generally, the following steps are required: Create a FileSystemObject object, apply related methods, and access object attributes.
(1) create a FileSystemObject object
Only one line of code is required to create a FileSystemObject objec
There are two main types of file processing:
Create, add, or delete data, and read files
Moving, copying, and deleting files
Create a file
There are three ways to create an empty text file (sometimes called a "text stream").
The first method is to use the CreateTextFile method. The following example demonstrates how to create a text file in VBScript in this way:
Dim FSO, F1
Set fso = CreateObject ("Scripting.FileSystemObject")
Set f1 = fso.
Javascript file operations 1. function implementation core: FileSystemObject object
To implement file operations in javascript, FileSystemobject objects are primarily used.
Ii. FileSystemObject Programming
It is very easy to program with FileSystemObject object. Generally, the following steps are required: Create a FileSystemObject object, apply related methods, and access object attributes.
(1) create a FileSystemObject object
Only one line of code is required to create a FileSystemObject objec
There are two main types of File Processing:Create, add, or delete data and read filesMove, copy, and delete objectsCreate a fileThere are three methods to create an empty text file (sometimes called a text stream.The first method is to use the createtextfile method. The following example demonstrates how to use the createtextfile method to create a text file:[VBScript]Dim FSO, F1Set FSO = Createobject ("sc
the specified special folder.
Note:The folderspec parameter can be any of the following values:
Windowsfolder 0 Windows folder, which contains files installed by the Windows operating system.Systemfolder 1 system folder, including libraries, fonts, and device drivers.Temporaryfolder 2 temp folder, used to store temporary files. Its path is in the TMP environment variable.
10. getparentfoldername Method
Syntax: object. getparentfoldername (PATH)
Purpose: return a string containing the name of th
I. function implementation core: FileSystemObject object
To implement file operations in javascript, FileSystemobject objects are primarily used.
Ii. FileSystemObject Programming
It is very easy to program with FileSystemObject object. Generally, the following steps are required: Create a FileSystemObject object, apply related methods, and access object attributes.
(1) create a FileSystemObject object
Only one line of code is required to create a FileSystemObject object:
Var fso = new ActiveXObj
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.